package com.tony.controller;

import com.alibaba.fastjson.JSON;
import com.tony.po.TonyUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/bean")
public class BeanController {

    @Autowired
    private TonyUser myTest;
    @Autowired
    RedisTemplate redisTemplate;

    @RequestMapping("/test")
    @ResponseBody
    public String myTest(){
        return JSON.toJSONString(myTest.toString());
    }
}
